<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>NATS C Client with Streaming support: Subscription</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with Streaming support
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__sub_group.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Subscription<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga38f1e41fc7619101fc4aa52014dd5428"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">natsSubscription_NoDeliveryDelay</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
<tr class="memdesc:ga38f1e41fc7619101fc4aa52014dd5428"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the No Delivery Delay mode.  <a href="#ga38f1e41fc7619101fc4aa52014dd5428">More...</a><br /></td></tr>
<tr class="separator:ga38f1e41fc7619101fc4aa52014dd5428"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">natsSubscription_NextMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **nextMsg, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
<tr class="memdesc:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next available message.  <a href="#ga6538a5d78dfb0f16514b94c8e74c11af">More...</a><br /></td></tr>
<tr class="separator:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">natsSubscription_Unsubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
<tr class="memdesc:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsubscribes.  <a href="#gaee87f8be0e6c2a4693ba2cea070583ba">More...</a><br /></td></tr>
<tr class="separator:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09f285de2746a6e27fc66efd60bd3116"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">natsSubscription_AutoUnsubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int max)</td></tr>
<tr class="memdesc:ga09f285de2746a6e27fc66efd60bd3116"><td class="mdescLeft">&#160;</td><td class="mdescRight">Auto-Unsubscribes.  <a href="#ga09f285de2746a6e27fc66efd60bd3116">More...</a><br /></td></tr>
<tr class="separator:ga09f285de2746a6e27fc66efd60bd3116"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8a37b2d5290da3aecc05483d79e7e254"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">natsSubscription_QueuedMsgs</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, uint64_t *queuedMsgs)</td></tr>
<tr class="memdesc:ga8a37b2d5290da3aecc05483d79e7e254"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of pending messages.  <a href="#ga8a37b2d5290da3aecc05483d79e7e254">More...</a><br /></td></tr>
<tr class="separator:ga8a37b2d5290da3aecc05483d79e7e254"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">natsSubscription_SetPendingLimits</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int msgLimit, int bytesLimit)</td></tr>
<tr class="memdesc:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit for pending messages and bytes.  <a href="#ga68a7cea89e75c529a7dd3bb77303dda4">More...</a><br /></td></tr>
<tr class="separator:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga786bb458981274fe717f266bd3b96d96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">natsSubscription_GetPendingLimits</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgLimit, int *bytesLimit)</td></tr>
<tr class="memdesc:ga786bb458981274fe717f266bd3b96d96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current limit for pending messages and bytes.  <a href="#ga786bb458981274fe717f266bd3b96d96">More...</a><br /></td></tr>
<tr class="separator:ga786bb458981274fe717f266bd3b96d96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca6262e2ef842caa701a9f233db72707"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">natsSubscription_GetPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgs, int *bytes)</td></tr>
<tr class="memdesc:gaca6262e2ef842caa701a9f233db72707"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of pending messages and bytes.  <a href="#gaca6262e2ef842caa701a9f233db72707">More...</a><br /></td></tr>
<tr class="separator:gaca6262e2ef842caa701a9f233db72707"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga476b7276d0b7f9946834d2bb2423e955"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">natsSubscription_GetDelivered</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs)</td></tr>
<tr class="memdesc:ga476b7276d0b7f9946834d2bb2423e955"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of delivered messages.  <a href="#ga476b7276d0b7f9946834d2bb2423e955">More...</a><br /></td></tr>
<tr class="separator:ga476b7276d0b7f9946834d2bb2423e955"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga24f1636869e26661ce62c9c9f4d80823"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">natsSubscription_GetDropped</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs)</td></tr>
<tr class="memdesc:ga24f1636869e26661ce62c9c9f4d80823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of dropped messages.  <a href="#ga24f1636869e26661ce62c9c9f4d80823">More...</a><br /></td></tr>
<tr class="separator:ga24f1636869e26661ce62c9c9f4d80823"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">natsSubscription_GetMaxPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgs, int *bytes)</td></tr>
<tr class="memdesc:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum number of pending messages and bytes.  <a href="#ga0abc5d9afbc6b0c9c5adaf533904c968">More...</a><br /></td></tr>
<tr class="separator:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe31911d8372db401d33856465421710"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gafe31911d8372db401d33856465421710">natsSubscription_ClearMaxPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
<tr class="memdesc:gafe31911d8372db401d33856465421710"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the statistics regarding the maximum pending values.  <a href="#gafe31911d8372db401d33856465421710">More...</a><br /></td></tr>
<tr class="separator:gafe31911d8372db401d33856465421710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12b60cdb3aca7329edebc480ae86bfab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">natsSubscription_GetStats</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *pendingMsgs, int *pendingBytes, int *maxPendingMsgs, int *maxPendingBytes, int64_t *deliveredMsgs, int64_t *droppedMsgs)</td></tr>
<tr class="memdesc:ga12b60cdb3aca7329edebc480ae86bfab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get various statistics from this subscription.  <a href="#ga12b60cdb3aca7329edebc480ae86bfab">More...</a><br /></td></tr>
<tr class="separator:ga12b60cdb3aca7329edebc480ae86bfab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e6454bbc7a90b9694112d45bd8de903"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">natsSubscription_IsValid</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
<tr class="memdesc:ga5e6454bbc7a90b9694112d45bd8de903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the validity of the subscription.  <a href="#ga5e6454bbc7a90b9694112d45bd8de903">More...</a><br /></td></tr>
<tr class="separator:ga5e6454bbc7a90b9694112d45bd8de903"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">natsSubscription_Drain</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
<tr class="memdesc:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the subscription with a default timeout.  <a href="#ga26c9736289d326fb7d6df7e2a0df72ab">More...</a><br /></td></tr>
<tr class="separator:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0408c9b6e4ad4078ac0267656ace222d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">natsSubscription_WaitForDrainCompletion</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
<tr class="memdesc:ga0408c9b6e4ad4078ac0267656ace222d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocks until the drain operation completes.  <a href="#ga0408c9b6e4ad4078ac0267656ace222d">More...</a><br /></td></tr>
<tr class="separator:ga0408c9b6e4ad4078ac0267656ace222d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50a95dd96e9b714201679a015d62832f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">natsSubscription_Destroy</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
<tr class="memdesc:ga50a95dd96e9b714201679a015d62832f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the subscription.  <a href="#ga50a95dd96e9b714201679a015d62832f">More...</a><br /></td></tr>
<tr class="separator:ga50a95dd96e9b714201679a015d62832f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>NATS Subscriptions. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga38f1e41fc7619101fc4aa52014dd5428"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_NoDeliveryDelay </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>By default, messages that arrive are not immediately delivered. This generally improves performance. However, in case of request-reply, this delay has a negative impact. In such case, call this function to have the subscriber be notified immediately each time a message arrives.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>No longer needed. Will be removed in the future. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6538a5d78dfb0f16514b94c8e74c11af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_NextMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
          <td class="paramname"><em>nextMsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the next message available to a synchronous subscriber or block until one is available. A timeout (expressed in milliseconds) can be used to return when no message has been delivered. If the value is zero, then this call will not wait and return the next message that was pending in the client, and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nextMsg</td><td>the location where to store the pointer to the next available message. </td></tr>
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">timeout</td><td>time, in milliseconds, after which this call will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> if no message is available. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaee87f8be0e6c2a4693ba2cea070583ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_Unsubscribe </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes interest on the subject. Asynchronous subscription may still have a callback in progress, in that case, the subscription will still be valid until the callback returns.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga09f285de2746a6e27fc66efd60bd3116"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_AutoUnsubscribe </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This call issues an automatic <a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba" title="Unsubscribes. ">natsSubscription_Unsubscribe</a> that is processed by the server when 'max' messages have been received. This can be useful when sending a request to an unknown number of subscribers.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">max</td><td>the maximum number of message you want this subscription to receive. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga8a37b2d5290da3aecc05483d79e7e254"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_QueuedMsgs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>queuedMsgs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the number of queued messages in the client for this subscription.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>Use <a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707" title="Returns the number of pending messages and bytes. ">natsSubscription_GetPending</a> instead.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">queuedMsgs</td><td>the location where to store the number of queued messages. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga68a7cea89e75c529a7dd3bb77303dda4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_SetPendingLimits </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>msgLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bytesLimit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the maximum number and size of incoming messages that can be buffered in the library for this subscription, before new incoming messages are dropped and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a> status is reported to the <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626" title="Callback used to notify the user of errors encountered while processing inbound messages. ">natsErrHandler</a> callback (if one has been set).</p>
<p>If no limit is set at the subscription level, the limit set by <a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription. ">natsOptions_SetMaxPendingMsgs</a> before creating the connection will be used.</p>
<dl class="section note"><dt>Note</dt><dd>If no option is set, there is still a default of <code>65536</code> messages and <code>65536 * 1024</code> bytes.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription. ">natsOptions_SetMaxPendingMsgs</a> </dd>
<dd>
<a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96" title="Returns the current limit for pending messages and bytes. ">natsSubscription_GetPendingLimits</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>he pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">msgLimit</td><td>the limit in number of messages that the subscription can hold. </td></tr>
    <tr><td class="paramname">bytesLimit</td><td>the limit in bytes that the subscription can hold. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga786bb458981274fe717f266bd3b96d96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetPendingLimits </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>msgLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>bytesLimit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Regardless if limits have been explicitly set with <a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4" title="Sets the limit for pending messages and bytes. ">natsSubscription_SetPendingLimits</a>, this call will store in the provided memory locations, the limits set for this subscription.</p>
<dl class="section note"><dt>Note</dt><dd>It is possible for <code>msgLimit</code> and/or <code>bytesLimits</code> to be <code>NULL</code>, in which case the corresponding value is obviously not stored, but the function will not return an error.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription. ">natsOptions_SetMaxPendingMsgs</a> </dd>
<dd>
<a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4" title="Sets the limit for pending messages and bytes. ">natsSubscription_SetPendingLimits</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">msgLimit</td><td>if not <code>NULL</code>, the memory location where to store the maximum number of pending messages for this subscription. </td></tr>
    <tr><td class="paramname">bytesLimit</td><td>if not <code>NULL</code>, the memory location where to store the maximum size of pending messages for this subscription. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaca6262e2ef842caa701a9f233db72707"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetPending </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>msgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the total number and size of pending messages on this subscription.</p>
<dl class="section note"><dt>Note</dt><dd>It is possible for <code>msgs</code> and <code>bytes</code> to be NULL, in which case the corresponding values are obviously not stored, but the function will not return an error.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">msgs</td><td>if not <code>NULL</code>, the memory location where to store the number of pending messages. </td></tr>
    <tr><td class="paramname">bytes</td><td>if not <code>NULL</code>, the memory location where to store the total size of pending messages. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga476b7276d0b7f9946834d2bb2423e955"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetDelivered </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t *&#160;</td>
          <td class="paramname"><em>msgs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the number of delivered messages for this subscription.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">msgs</td><td>the memory location where to store the number of delivered messages. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga24f1636869e26661ce62c9c9f4d80823"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetDropped </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t *&#160;</td>
          <td class="paramname"><em>msgs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the number of known dropped messages for this subscription. This happens when a consumer is not keeping up and the library starts to drop messages when the maximum number (and/or size) of pending messages has been reached.</p>
<dl class="section note"><dt>Note</dt><dd>If the server declares the connection a slow consumer, this number may not be valid.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription. ">natsOptions_SetMaxPendingMsgs</a> </dd>
<dd>
<a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4" title="Sets the limit for pending messages and bytes. ">natsSubscription_SetPendingLimits</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">msgs</td><td>the memory location where to store the number of dropped messages. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0abc5d9afbc6b0c9c5adaf533904c968"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetMaxPending </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>msgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the maximum of pending messages and bytes seen so far.</p>
<dl class="section note"><dt>Note</dt><dd><code>msgs</code> and/or <code>bytes</code> can be NULL.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">msgs</td><td>if not <code>NULL</code>, the memory location where to store the maximum number of pending messages seen so far. </td></tr>
    <tr><td class="paramname">bytes</td><td>if not <code>NULL</code>, the memory location where to store the maximum number of bytes pending seen so far. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafe31911d8372db401d33856465421710"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_ClearMaxPending </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears the statistics regarding the maximum pending values.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga12b60cdb3aca7329edebc480ae86bfab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetStats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>pendingMsgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>pendingBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxPendingMsgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxPendingBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t *&#160;</td>
          <td class="paramname"><em>deliveredMsgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t *&#160;</td>
          <td class="paramname"><em>droppedMsgs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is a convenient function to get several subscription's statistics in one call.</p>
<dl class="section note"><dt>Note</dt><dd>Any or all of the statistics pointers can be <code>NULL</code>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707" title="Returns the number of pending messages and bytes. ">natsSubscription_GetPending</a> </dd>
<dd>
<a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968" title="Returns the maximum number of pending messages and bytes. ">natsSubscription_GetMaxPending</a> </dd>
<dd>
<a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955" title="Returns the number of delivered messages. ">natsSubscription_GetDelivered</a> </dd>
<dd>
<a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823" title="Returns the number of dropped messages. ">natsSubscription_GetDropped</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
    <tr><td class="paramname">pendingMsgs</td><td>if not <code>NULL</code>, memory location where to store the number of pending messages. </td></tr>
    <tr><td class="paramname">pendingBytes</td><td>if not <code>NULL</code>, memory location where to store the total size of pending messages. </td></tr>
    <tr><td class="paramname">maxPendingMsgs</td><td>if not <code>NULL</code>, memory location where to store the maximum number of pending messages seen so far. </td></tr>
    <tr><td class="paramname">maxPendingBytes</td><td>if not <code>NULL</code>, memory location where to store the maximum total size of pending messages seen so far. </td></tr>
    <tr><td class="paramname">deliveredMsgs</td><td>if not <code>NULL</code>, memory location where to store the number of delivered messages. </td></tr>
    <tr><td class="paramname">droppedMsgs</td><td>if not <code>NULL</code>, memory location where to store the number of dropped messages. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5e6454bbc7a90b9694112d45bd8de903"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsSubscription_IsValid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a boolean indicating whether the subscription is still active. This will return false if the subscription has already been closed, or auto unsubscribed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga26c9736289d326fb7d6df7e2a0df72ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_Drain </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Drain will remove interest but continue callbacks until all messages have been processed.</p>
<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the operation to complete. To synchronously wait, see <a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes. ">natsSubscription_WaitForDrainCompletion</a></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes. ">natsSubscription_WaitForDrainCompletion</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0408c9b6e4ad4078ac0267656ace222d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_WaitForDrainCompletion </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function blocks until the subscription is fully drained. Returns no error if the subscription is drained or closed, otherwise returns the error indicating why the wait returned before completion or if the subscription was not in drained mode.</p>
<p>The timeout is expressed in milliseconds. Zero or negative value means that the call will not timeout.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object </td></tr>
    <tr><td class="paramname">timeout</td><td>how long to wait for the operation to complete, expressed in milliseconds. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga50a95dd96e9b714201679a015d62832f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsSubscription_Destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroys the subscription object, freeing up memory. If not already done, this call will removes interest on the subject.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject. ">natsSubscription</a> object to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
